package edu.hunau.cxb19.oop.class31.account;

/**
 * 存款的线程
 * 
 * @author hb
 *
 *         2020-04-14 15:59:10
 */
public class AddMoney extends Thread {
	private Account account;
	// 取款金额
	private double money;

	/**
	 * @param account
	 */
	public AddMoney(String name, Account account, double money) {
		super(name);
		this.money = money;
		this.account = account;
	}

	@Override
	public void run() {
		account.addMoney(money);
	}

	/**
	 * @return the account
	 */
	public Account getAccount() {
		return account;
	}

	/**
	 * @param account the account to set
	 */
	public void setAccount(Account account) {
		this.account = account;
	}

	/**
	 * @return the money
	 */
	public double getMoney() {
		return money;
	}

	/**
	 * @param money the money to set
	 */
	public void setMoney(double money) {
		this.money = money;
	}

}
